package com.baizhi.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

//文章类
public class Article {
    //主键
    private Integer articleId;
   //文章标题
    private  String articleName;
    //文章外边的图片
    private  String articleImage;
    //文章内容
    private  String articleContent;
    //外键
    private Integer guruId;
    @JsonFormat(pattern = "yyyy/MM/dd")

    //文章上传日期
    private Date articleDate;
    //多对一
    private  Guru guru;


    public Article() {
    }

    public Article(Integer articleId, String articleName, String articleImage, String articleContent, Integer guruId, Date articleDate, Guru guru) {
        this.articleId = articleId;
        this.articleName = articleName;
        this.articleImage = articleImage;
        this.articleContent = articleContent;
        this.guruId = guruId;
        this.articleDate = articleDate;
        this.guru = guru;
    }

    public Integer getArticleId() {
        return articleId;
    }

    public void setArticleId(Integer articleId) {
        this.articleId = articleId;
    }

    public String getArticleName() {
        return articleName;
    }

    public void setArticleName(String articleName) {
        this.articleName = articleName;
    }

    public String getArticleImage() {
        return articleImage;
    }

    public void setArticleImage(String articleImage) {
        this.articleImage = articleImage;
    }

    public String getArticleContent() {
        return articleContent;
    }

    public void setArticleContent(String articleContent) {
        this.articleContent = articleContent;
    }

    public Integer getGuruId() {
        return guruId;
    }

    public void setGuruId(Integer guruId) {
        this.guruId = guruId;
    }

    public Date getArticleDate() {
        return articleDate;
    }

    public void setArticleDate(Date articleDate) {
        this.articleDate = articleDate;
    }

    public Guru getGuru() {
        return guru;
    }

    public void setGuru(Guru guru) {
        this.guru = guru;
    }

    @Override
    public String toString() {
        return "Article{" +
                "articleId=" + articleId +
                ", articleName='" + articleName + '\'' +
                ", articleImage='" + articleImage + '\'' +
                ", articleContent='" + articleContent + '\'' +
                ", guruId=" + guruId +
                ", articleDate=" + articleDate +
                ", guru=" + guru +
                '}';
    }
}
